package com.hyg.lib_common.ui.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.hyg.lib_base.mainUtils.StatusBarUtil;
import com.hyg.lib_common.Base.BaseActivity;
import com.hyg.lib_common.R;

public class TestSelfResultActivity extends BaseActivity {
    String type;
    String result;
    TextView ResultTv, ResultInfoTV;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_self_result);
        StatusBarUtil.setStatusBar(1, this, getResources().getColor(R.color.white), 60, null, null, true);
        init();
    }

    public void init() {
        type = getIntent().getStringExtra("type");
        result = getIntent().getStringExtra("result");
        ResultTv = findViewById(R.id.tv_result);
        ResultInfoTV = findViewById(R.id.tv_resultinfo);
        ResultTv.setText(result);
        if (result.equalsIgnoreCase("健康")) {
            ResultTv.setBackground(getDrawable(R.mipmap.test_self_best_result));
        }
        ResultInfoTV.setText("\u3000\u3000根据您本次的检测结果[" + result + "]，我们为您定制了音乐疗愈，请根据自身情况使用。");
    }

    public void onBack(View view) {
        finish();
    }

    public void onRetest(View view) {
        Intent intent = new Intent(this, TestSelfJingshenActivity.class);
        intent.putExtra("type", "焦虑辨识");
        startActivity(intent);
        finish();
    }

}